package com.example.sql.manager.enums;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

public enum Enabled {

    DISABLE(0, "禁用"),
    ENABLED(1, "启用");

    private int val;
    private String desc;

    Enabled(int val, String desc) {
        this.val = val;
        this.desc = desc;
    }

    public static List<Integer> getValues() {
        return Arrays.stream(Enabled.values()).map(Enabled::getVal).collect(Collectors.toList());
    }

    public int getVal() {
        return val;
    }

    public void setVal(int val) {
        this.val = val;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
